home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_Logon_VBScript.asp < prev    next >
Encoding:
Text File  |  1998-09-16  |  1.3 KB  |  50 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3.  
  4. <!*************************
  5. This sample is provided for educational purposes only. It is not intended to be 
  6. used in a production environment, has not been tested in a production environment, 
  7. and Microsoft will not provide technical support for it. 
  8. *************************>
  9.  
  10. <% 
  11.     'Force Authentication if the LOGON_USER Server Variable is blank
  12.     'by sending the Response.Status of 401 Access Denied.
  13.     
  14.     'Finish the Page by issuing a Response.End so that a user
  15.     'cannot cancel through the dialog box.
  16.  
  17.     If Request.ServerVariables("LOGON_USER") = "" Then
  18.         Response.Status = "401 Access Denied"
  19.         Response.End        
  20.     End If
  21. %>
  22.  
  23. <HTML>
  24.     <HEAD>
  25.         <TITLE>Login Screens</TITLE>
  26.     </HEAD>
  27.  
  28.     <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">
  29.  
  30.  
  31.         <!-- Display header. -->
  32.  
  33.         <FONT SIZE="4" FACE="ARIAL, HELVETICA">
  34.         <B>Login Screens</B></FONT><BR>
  35.       
  36.         <HR SIZE="1" COLOR="#000000">
  37.  
  38.     
  39.         <!-- Display LOGON_USER Server variable. -->
  40.  
  41.         You logged in as user:<B>  <%= Request.ServerVariables("LOGON_USER") %></B>
  42.  
  43.  
  44.         <!-- Display AUTH_TYPE Server variable. -->
  45.  
  46.         <P>You were authenticated using:<B>  <%= Request.ServerVariables("AUTH_TYPE") %></B> authentication.</P>
  47.  
  48.     </BODY>
  49. </HTML>
  50.